export const useAppStore = defineStore('app', {
    state: () => ({ headerMenuActive: '' }),
    getters: {
        getHeaderMenuActive: (state) => {
            if (state.headerMenuActive === '') {
                state.headerMenuActive = sessionStorage.getItem('wac-header-menu-active') || '/'
            }
            return  state.headerMenuActive
        }
    },
    actions: {
        setHeaderMenuActive(path: string) {
            sessionStorage.setItem('wac-header-menu-active', path)
            this.headerMenuActive = path
        },
    },
})